package com.libraryApp.service;

import com.libraryApp.entity.BookDo;
import com.libraryApp.entity.UserDo;
import com.libraryManage.commons.utils.ResponseEntity;
import com.libraryManage.commons.utils.SimpleResp;

import java.util.List;

/**
 * @CreateDate 2021-03-14
 * @Author yufang
 */
public interface AppBookService {

    /**
     * 搜索图书
     * @param pageNumber
     * @param bookCategoryId
     * @param keyword
     * @return
     */
    ResponseEntity<List<BookDo>> searchBook(int pageNumber, int bookCategoryId, String keyword, String searchType);

    /**
     * 获取热门图书
     * @return
     */
    ResponseEntity<List<BookDo>> getHotBook();


    /**
     * 图区图书详情
     * @param bookId
     * @return
     */
    ResponseEntity<BookDo> getBookData(int bookId);

    /**
     * 加入书架
     * @param bookId
     * @return
     */
    SimpleResp addBookshelf(int bookId, UserDo userDo);

    /**
     * 预约借阅图书
     * @param userId
     * @param bookId
     * @return
     */
    SimpleResp borrowBook(Long userId, int bookId);

}
